package com.test.vue.emuns;

public enum ResponseEnum {

    SUCCESS_RESPONSE(200,"查询成功"),
    FAIL_SEARCH(102,"未查询到结果"),
    SUCCESS_SAVE(200,"保存成功"),
    FAIL_SAVE(104,"保存或更新失败"),
    BAD_REQUEST(400, "请求类型错误"),
    SUCCESS_DELETE(200,"删除成功"),
    FAIL_DELETE(106,"删除失败"),
    SUCCESS_UPLOAD(200,"操作成功"),
    FAIL_UPLOAD(150,"上传发生了错误"),
    FAIL_UPLOAD_EMPTY_FILES(152,"上传失败,未获取到上传的文件"),
    USER_ACCESS(200,"登录成功"),

    USER_NOT_FOUND(1000,"用户名不存在"),
    USER_NOT_ACCESS(1002,"用户已被停用"),
    ACCOUNT_NOT_ACCESS(1004,"账号已被停用"),
    USER_PWD_ERROR(1006,"密码错误"),
    USER_NOT_LOGIN(1008,"用户未登录"),
    CAPTCHA_NOT_MATCH(1010,"验证码错误"),
    CAPTCHA_EXPIRED(1012,"验证码已失效"),
    OPERATION_NOT_ACCESS(1014,"未授权的操作"),
    NOT_TOKEN(1016,"未提供token"),
    INVALID_TOKEN(1018,"token无效"),
    TOKEN_TIMEOUT(1020,"token已过期"),
    BE_REPLACED(1022,"token已被顶下线"),
    KICK_OUT(1024,"token已被踢下线"),
    SESSION_NOT_LOGIN(1026,"当前会话未登录"),

    ACCOUNT_IS_EXISTS(1100,"账号已存在"),

    DATA_RULE_NOT_ACCESS(1200,"非法的数据权限"),


    PARAMS_NOT_READABLE(2000,"请求数据解析失败"),
    JSON_CONVERT_ERROR(2002,"JSON请求数据解析失败"),
    COLUMN_NOT_FOUND(2004,"该字段无效"),
    UNKNOWN_OPERATOR(2006,"非法的操作符"),
    BAD_SQL_GRAMMAR(2008,"SQL语法错误，执行失败"),
    OBJECT_NOT_SERIALIZABLE(2010,"传输对象未序列化"),
    BEAN_NOT_AVAILABLE(2012,"无法获取bean"),
    FILESIZE_LIMIT_EXCEEDED(2014,"上传文件过大"),
    PARAMS_NOT_NULL(2016,"请求必填参数为空"),
    FILE_NOT_FOUND(2018,"未找到文件"),
    EXCEL_CONVERT_ERR(2020,"excel解析错误"),
    EXCEL_VERIFY_ERR(2022,"excel数据校验失败"),
    REQID_NOT_PRESENT(2024,"RequestID不存在"),
    VALIDATION_ERROR(2026,"数据校验错误"),

    MECHANISM_NOT_VALID(3000,"机构不存在")

    ;
    private int code;
    private String msg;

    ResponseEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
